import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
import './App.css';
import MenuTop from './component/MenuTop';
import React, { useState } from 'react';
import ChatBI from '@/pages/chatBI/index';
// import ChatBI_backup from '@/pages/chatBI_backup/index';
// import Source from '@/pages/source/index';
import DataManagement from '@/pages/dataManagement/index';
import KnowledgeManagement from '@/pages/knowledgeManagement/index';
import DocumentManagement from '@/pages/documentManagement/index';
import CaseOptimization from '@/pages/caseOptimization/index';

import Demo1 from '@/demo/demo1';
import Demo2 from '@/demo/demo2';
import Demo3 from '@/demo/demo3';
import Demo4 from '@/demo/demo4';

function App() {
    return (
        <div className="App">
            <BrowserRouter>
                <MenuTop />
                <Routes>
                    <Route path="/" element={<Navigate to="/chatBI" replace />} />
                    <Route path="/chatBI" element={<ChatBI />} />
                    {/* <Route path="/chatBI_backup" element={<ChatBI_backup />} /> */}
                    <Route path="/DataManagement" element={<DataManagement />} />
                    <Route path="/KnowledgeManagement" element={<KnowledgeManagement />} />
                    <Route path="/DocumentManagement" element={<DocumentManagement />} />
                    <Route path="/CaseOptimization" element={<CaseOptimization />} />

                    <Route path="/demo1" element={<Demo1 />} />
                    <Route path="/demo2" element={<Demo2 />} />
                    <Route path="/demo3" element={<Demo3 />} />
                    <Route path="/demo4" element={<Demo4 />} />
                </Routes>
            </BrowserRouter>
        </div>
    );
}

export default App;
